---
id: 655a16db1ccc5e132b5bc44d
title: Step 21
challengeType: 20
dashedName: step-21
---

# --description--

Now, make the `search` method return the result of the `_search()` call.

# --hints--

You should prepend the `return` statement to your `_search()` call.

```js
({ test: () => assert.match(code, /return\s+self\._search\(\s*self\.root\s*,\s*key\s*\)/) });
```

# --seed--

## --seed-contents--

```py
class TreeNode:
    def __init__(self, key):
        self.key = key
        self.left = None
        self.right = None

class BinarySearchTree:
    def __init__(self):
        self.root = None

    def insert(self,key):
        self.root = self._insert(self.root, key)

    def _insert(self, node, key):
        if node is None:
            return TreeNode(key)
        if key < node.key:
            node.left = self._insert(node.left, key)
        elif key > node.key:
            node.right = self._insert(node.right, key)
        return node
--fcc-editable-region--
    def search(self, key):
        self._search(self.root, key)
--fcc-editable-region--
```
